﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;

namespace MyAMS.WebServer.ActionFilter
{
    /// <summary>
    /// 动作过滤器注册表
    /// </summary>
    public interface IActionFilterRegistry
    {
        /// <summary>
        /// 清空
        /// </summary>
        void Clear();

        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="criteria">动作过滤器标准</param>
        /// <param name="filterType">动作过滤器类型</param>
        void Register(IEnumerable<IActionFilterCriteria> criteria, Type filterType);

        /// <summary>
        /// 获取动作过滤器
        /// </summary>
        /// <param name="controllerContext"></param>
        /// <param name="actionDescriptor"></param>
        /// <returns></returns>
        FilterInfo GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor);
    }
}
